package com.norteksoft.erm.model;

import java.sql.Timestamp;
import java.util.Set;
import org.apache.commons.lang.builder.HashCodeBuilder;

/**
 * 事件日志
 * 
 * @hibernate.class table="ERM_BIZLOG"
 * @author Jiffy
 * 
 */
public class BizLog extends BaseObject {

	private static final long serialVersionUID = 6378639497133480057L;

	private Long OID = new Long(-1);// OID

	private String userName;// 操作者

	private String subSysCode;// 所属子系统

	private String function;// 执行功能

	private Timestamp actionTime;// 操作时间

	private String actionDesc;// 操作描述

	private String snapshotPath;// 操作页面快照:链接到本地html文件，为空时表示没有快照

	private String actionAudit;// 事后审计（弃用）

	private String isSucceed;// 是否成功（弃用）

	private Set tags;// 标签

	private Set dataLogs;// 相关数据（外键关联）

	private Set dataLogVOs;// 相关数据（冗余数据）

	public int hashCode() {
		return new HashCodeBuilder().append(OID).append(userName).append(
				subSysCode).append(function).append(actionTime).append(
				actionDesc).append(snapshotPath).append(actionAudit).append(
				isSucceed).toHashCode();
	}

	/**
	 * @hibernate.id generator-class="sequence" column="OID" unsaved-value="-1"
	 *               type="long"
	 * @hibernate.generator-param name="sequence" value="ERM_SEQUENCE_FREQUENT"
	 */
	public Long getOID() {
		return OID;
	}

	public void setOID(Long oid) {
		OID = oid;
	}

	/**
	 * @hibernate.property column="SNAPSHOTPATH" length="500" type="string"
	 * @return String
	 */
	public String getSnapshotPath() {
		return snapshotPath;
	}

	public void setSnapshotPath(String snapshotPath) {
		this.snapshotPath = snapshotPath;
	}

	/**
	 * @hibernate.property column="ISSUCCEED" length="10" type="string"
	 * @return String
	 */

	public String getIsSucceed() {
		return isSucceed;
	}

	public void setIsSucceed(String isSucceed) {
		this.isSucceed = isSucceed;
	}

	/**
	 * @hibernate.property column="USERNAME" length="30" type="string"
	 *                     not-null="true"
	 * @return String
	 */
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
	 * @hibernate.property column="FUNCTION" length="50" type="string"
	 * @return String
	 */
	public String getFunction() {
		return function;
	}

	public void setFunction(String function) {
		this.function = function;
	}

	/**
	 * @hibernate.property column="SUBSYSCODE" length="30" type="string"
	 * @return String
	 */
	public String getSubSysCode() {
		return subSysCode;
	}

	public void setSubSysCode(String subSysCode) {
		this.subSysCode = subSysCode;
	}

	/**
	 * @hibernate.property column="ACTIONTIME" type="timestamp"
	 * @return String
	 */
	public Timestamp getActionTime() {
		return actionTime;
	}

	public void setActionTime(Timestamp actionTime) {
		this.actionTime = actionTime;
	}

	/**
	 * @hibernate.property column="ACTIONDESC" length="300" type="string"
	 * @return String
	 */
	public String getActionDesc() {
		return actionDesc;
	}

	public void setActionDesc(String actionDesc) {
		this.actionDesc = actionDesc;
	}

	/**
	 * @hibernate.property column="ACTIONAUDIT" length="300" type="string"
	 * @return String
	 */

	public String getActionAudit() {
		return actionAudit;
	}

	public void setActionAudit(String actionAudit) {
		this.actionAudit = actionAudit;
	}

	public Set getDataLogs() {
		return dataLogs;
	}

	public void setDataLogs(Set dataLogs) {
		this.dataLogs = dataLogs;
	}

	public Set getTags() {
		return tags;
	}

	public void setTags(Set tags) {
		this.tags = tags;
	}

	public Set getDataLogVOs() {
		return dataLogVOs;
	}

	public void setDataLogVOs(Set dataLogVOs) {
		this.dataLogVOs = dataLogVOs;
	}

}
